#!/usr/bin/env pythonBasics
# -*-coding:utf-8 -*-

# Author:super
import xlrd
class excelVariable:
	username=0
	password=1
	divText=2
def getUsername():
	return excelVariable.username

def getPassword():
	return excelVariable.password

def getDivText():
	return excelVariable.divText

class OperationExcel:
	def getExcel(self):
		obj=xlrd.open_workbook('data.xls')
		return obj.sheet_by_index(0)

	def get_rows(self):
		'''获取所有的⾏数'''
		return self.getExcel().nrows

	def get_cols(self):
		'''获取⾏和列'''
		return self.getExcel().ncols

	def getValue(self,row,col):
		'''获取单元格的具体内容'''
		return self.getExcel().cell_value(row,col)

	def getUsername(self,row):
		return self.getValue(row=row,col=getUsername())

if __name__ == '__main__':
	operation=OperationExcel()
	print(operation.getUsername(row=2))